package com.fr.report.script.function;

import com.fr.base.core.DateUtils;
import com.fr.report.script.Function;
import com.fr.report.script.Function.Type;
import com.fr.report.script.NormalFunction;
import java.text.DateFormat;
import java.util.Date;

public class NOW extends NormalFunction
{
  public Object run(Object[] paramArrayOfObject)
  {
    return DateUtils.TIMEFORMAT.format(new Date());
  }

  public Function.Type getType()
  {
    return Function.DATETIME;
  }

  public String getCN()
  {
    return "NOW():获取当前时间。\n示例：\n如果系统时间是15点18分38秒\n则NOW()等于15:18:36。";
  }

  public String getEN()
  {
    return "NOW(): Returns the serial number of the current date and time. \n\nExample：\n   If the system time is 15:18:38, then NOW() = 15:18:36.";
  }
}